<?php
/*
	积分排行
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
if($_RQ['op']=='main'){
	$return['list']=array();
	$return['params']['type']=$_RQ['type']?:0;
	set_html('title','排行榜');
	exi($return);
}
// 获取排名数据
if($_RQ['op']=='getlist'){
	$params=array('uniacid'=>$_SESSION['uniacid'],'is_agent >'=>0);
	$month_start=strtotime(date('Ym').'01');
	$pindex = max(1, intval($_RQ['page']));
	$psize=$this->setting['month_num']?:10;
	$total='';
	$list=pdo_getslice('jy_area_dai_member',$params,array($pindex,$psize),$total,array('mid','level_id','order_price'),'','order_price desc,mid desc');
	$credit_types=credit_types();
	foreach($list as $k=>&$item){
			$item['member']=cfc('core')->member_show($item['mid']);
			$paiming=$k+1;
			$item['paiming']='第'.$paiming.'名';
	}
	$return['list']=$list;
	exi($return);
}
?>